package com.example.spring.service;

import com.example.spring.config.BeanPostProcessor;
import com.example.spring.config.Component;

/**
 * @author gqz
 * @description
 * @date 2021/10/31 21:59
 */
@Component(value = "processor")
public class GqzBeanPostProcessor implements BeanPostProcessor {
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) {
        System.out.println(beanName+"初始化前");
        return bean;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) {
        System.out.println(beanName+"初始化后");
        return bean;
    }
}
